import { Provide } from '@midwayjs/decorator';
import { CoolController, BaseController } from 'midwayjs-cool-core';
import { Context } from 'vm';
import { CourseTypeEntity } from '../../entity/courseType';
import { CourseTypeService } from '../../service/courseType';

/**
 * 描述
 */
@Provide()
@CoolController({
  api: ['add', 'delete', 'update', 'info', 'list', 'page'],
  entity: CourseTypeEntity,
  service:CourseTypeService,
  pageQueryOp:{ 
    where: async (ctx: Context) => { 
      return [ 
        ['a.isDelete = :isDelete', { isDelete: false }] 
      ] 
    } 
  },
  listQueryOp:{ 
    where: async (ctx: Context) => { 
      return [ 
        ['a.isDelete = :isDelete', { isDelete: false }] 
      ] 
    } 
  }
})
export class CourseTypeAdminController extends BaseController {}
